import { roleUpdateSchema } from "~/validators/role";
export default defineEventHandler(async (event) => {
  const result = await runValidate(roleUpdateSchema, event);
  const newData = RoleSchema.findByIdAndUpdate(result.data._id, result.data, {
    new: true,
  });
  return newData;
});
